//
//  AXFCommonProblemsController.m
//  客服和反馈
//
//  Created by Freakthen on 2016/11/21.
//  Copyright © 2016年 Freakthen. All rights reserved.
//

#import "AXFCommonProblemsController.h"
#import "AXFWhiteNavView.h"

@interface AXFCommonProblemsController ()<AXFWhiteNavViewDelegate>

@property (nonatomic,strong) NSArray <NSDictionary *> *array;
@end

@implementation AXFCommonProblemsController

- (void)viewDidLoad {
    [super viewDidLoad];
//    self.navigationItem.title = @"常见问题";
//    [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:cellID];
//    
//    NSArray *array = @[@{@"textLabel": @"爱鲜蜂的送货时间？"},
//                       @{@"textLabel": @"爱鲜蜂客服服务时间？"},
//                       @{@"textLabel": @"如何在爱鲜蜂下单购买产品？"},
//                       @{@"textLabel": @"可配送哪些城市？"},
//                       @{@"textLabel": @"如何新增、编辑和删除收获地址？"},
//                       @{@"textLabel": @"如何查询历史？"},
//                       @{@"textLabel": @"什么事鲜蜂精选产品？"},
//                       @{@"textLabel": @"优惠券怎么使用？"},
//                       @{@"textLabel": @"免责声明？"},
//                       @{@"textLabel": @"收获码怎么使用？"},
//                       @{@"textLabel": @"退货流程？"},
//                       ];
//    _array = array;
	
	
}

- (void)setupUI {
    
    AXFWhiteNavView *whiteNavView = [[AXFWhiteNavView alloc] init];
    
    [whiteNavView setTitleName:@"常见问题" andFunctionName:nil];
    
    whiteNavView.delegate = self;
    
    [self.view addSubview:whiteNavView];
    
	NSURLRequest *urlReq = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://m.beequick.cn/show/webview/p/qa?__d=d14ryS1bFkB0dOBn%2Bvd9GDn55g34BaxSwQk6PAIdxaUcOZK4qZM5HpDIlnwAZPd5UyoGAl5VrxjngS7/VNfVPUj2iqrOmO6R3Ek0q/D53DOItoLlaw%2Bf/53dpER4x14eK17f&__v=ios5.9&location_hash=2e7577lNaa2SGYIfkVIoNiFqGKZJN%2B5FTxs8%2By9kiloWjXw%2BgbQ72jrK4GAqINz9FzBwcg1jo0ouZxrlweIQ&zchtauth=e2ce4bEoDMWWB15V98ApGBX150AVjnGXVN7pv7sV4WbS9fEQ&timestamp=1479967051131581&token=222f92ef2ba0b2f15c6f38c4dcbc47cc&mac=1623659c052587c68cdab2839d4da15e"]];
    UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectZero];
	[self.view addSubview:webView];
	[webView loadRequest:urlReq];
    
    [whiteNavView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.top.offset(0);
        make.height.mas_equalTo(kNAVBARH + 20);
    }];
    
    [webView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.equalTo(self.view);
        make.top.equalTo(whiteNavView.mas_bottom);
    }];
}

- (void)backToViewController
{
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

#pragma mark - Table view data source

//- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
//    return 11;
//}
//
//- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
//    return 1;
//}
//- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
//    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID forIndexPath:indexPath];
//    cell.textLabel.text = @"如何在爱鲜蜂下单购买产品？";
//    [_array enumerateObjectsUsingBlock:^(NSDictionary * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
//        if (indexPath.section == idx) {
//            cell.textLabel.text = obj[@"textLabel"];
//        }
//    }];
//    return cell;
//}



@end
